package com.liaohuakai.piggybank.remote

import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory

/**
 * Author: Leo Liao <lliao@midtronics.com>
 * Date: 17/07/2025 16:30
 * Description:
 */
object PiggyBankServiceCreator {
    private const val BASE_URL = "https://liaohuakai.cn"
    val retrofit: Retrofit = Retrofit.Builder()
        .baseUrl(BASE_URL)
        .addConverterFactory(GsonConverterFactory.create())
        .build()

    inline fun <reified T> create(): T {
        return retrofit.create(T::class.java)
    }
}